package com.example.anpapi.entity.po.usermodel.UserStatistics;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

@TableName("user_statistics")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class UserStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 统计ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 总阅读数
     */
    @TableField("total_read_count")
    private Integer totalReadCount;

    /**
     * 总点赞数
     */
    @TableField("total_like_count")
    private Integer totalLikeCount;

    /**
     * 总评论数
     */
    @TableField("total_comment_count")
    private Integer totalCommentCount;

    /**
     * 总收藏数
     */
    @TableField("total_favorite_count")
    private Integer totalFavoriteCount;

    /**
     * 每日登录次数
     */
    @TableField("daily_login_count")
    private Integer dailyLoginCount;

    /**
     * 最后登录日期
     */
    @TableField("lastlogin_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate lastloginDate;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

}

